Version

Item Property (SubObjectsDictionaryBase<TKey,TValue>)

Gets or sets the value associated with the specified key.
Syntax
'Declaration
 
Public Overridable Default Property Item( _
   ByVal key As TKey _
) As TValue
public virtual TValue this[ 
   TKey key
]; {get; set;}

Parameters

key
The key of the value to get or set.

Property Value

The value associated with the specified key. If the specified key is not found, a get operation throws a System.Collections.Generic.KeyNotFoundException, and a set operation creates a new element with the specified key.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionkey is null.
System.Collections.Generic.KeyNotFoundExceptionThe property is retrieved and key does not exist in the collection.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also